what is different Var And Dynamic Types In c#.
1726
24-Jan-2016
I want to know what is different Var And Dynamic Types In c#. give me a sample example
Anonymous User
24-Jan-2016Var
Var keyword is an implicit way of defining DataTypes. Implicit means indirect way of defining variable types.
In simple words var keyword data types is defined by the compiler during the generation of the “IL” code.
dynamic
Dynamic is a type of declaration This means the type of variable declared is decided by the compiler at runtime time.
Shiva Shukla
24-Jan-2016As you know it will check at rum time, so there is no need to initialize the value at compile time, you can initialize it on run time.